package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseIdEntity;
import com.ruoyi.common.utils.StringUtils;
import lombok.Data;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;

import java.util.Date;

/**
 * 保护装置和变电站设备关联信息对象 s_device_protect_device
 * 
 * @author ruoyi
 * @date 2023-07-05
 */
@Data
@ApiModel(value = "SDeviceProtectDevice", description = "保护装置和变电站设备关联信息对象")
public class SDeviceProtectDevice extends BaseIdEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @ApiModelProperty("id")
    private String id;

    /** 保护装置id */
    @Excel(name = "保护装置id")
    @ApiModelProperty("保护装置id")
    private String protectDeviceId;

    /** 设备id */
    @Excel(name = "设备id")
    @ApiModelProperty("设备id")
    private String deviceId;

    public <T> QueryWrapper<T> queryWrapper(){
        QueryWrapper<T> wrapper=new QueryWrapper<>();

        wrapper.eq(StringUtils.isNotEmpty(id),"id" , id);
        wrapper.eq(StringUtils.isNotEmpty(protectDeviceId),"protect_device_id" , protectDeviceId);
        wrapper.eq(StringUtils.isNotEmpty(deviceId),"device_id" , deviceId);
        return wrapper;
    }

}
